try {
    $response = Invoke-WebRequest -Uri "http://www.wechatvideo.com/index/Api/getNewMsg"
#    $response | Out-File "D:\www\wechat_video\log.txt" -Append
} catch {
    $_.Exception.Message | Out-File "D:\www\wechat_video\error_log.txt" -Append
}